//
//  KLHelp.m
//  tableview多选问题
//
//  Created by 华杨科技 on 2017/5/20.
//  Copyright © 2017年 饶波. All rights reserved.
//

#import "KLHelp.h"

@implementation KLHelp
+ (void)navSetMianMi:(UIViewController *)SEFL doBackHandler:(void (^)(UIButton *backBtn))doBackHandler saveHandler:(void (^)(UIButton *saveBtn))saveHandler {
    [SEFL.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont systemFontOfSize:21.0]}];
    SEFL.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:(float)8/255 green:(float)128/255 blue:(float)181/255 alpha:1];
    [SEFL.navigationController.navigationBar setTranslucent:YES];
    
    // 返回
    UIButton *doBackButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    doBackButton.frame = CGRectMake(10, 0, 10, 20);
    [doBackButton setImage:[UIImage imageNamed:@"返回"] forState:(UIControlStateNormal)];
    SEFL.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:doBackButton];
    doBackHandler(doBackButton);
    
    // 保存
    UIButton *saveButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [saveButton setTitle:@"保存" forState:(UIControlStateNormal)];
    saveButton.frame = CGRectMake(UI_View_Width -60, 0, 60, 20);
    SEFL.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:saveButton];
    saveHandler(saveButton);
}


@end
